Silk Mobile

Table of Contents (Homepage)

Overloading Element To The Object Repository

Since Image recognition requires pixel to pixel match, it will fail if need to use it with different devices with different resolution.

To prevent it if image recognition is still required, there is the possibility to overload Elements to the Object Repository. Meaning adding more than one image to an existing object, So while try to identify the element, it will use all the images it contains on the object repository.

Example

In this example, we will use an iPad and an iPhone and We would want to run the same script on both.

Step 1: Launch EriBank.

Step 2: Navigate to the 'Make Payment' page.

Step 3: Click in the amount textbox. Note that the keypads differs from each one and so is the delete symbol.

images/download/attachments/3310038/image54.png

Step 4: Type value on the amount text field.

Step 5: We will use the delete button on the keypad to erase the input on the amount text field.

Step 6: To add the delete button to the object spy

  • use the object spy

  • click on the delete symbol

  • extract object

  • create a new object
    We will create an object by the name ‘Del’.

images/download/attachments/3310038/image55.png

Step 7: Repeat steps 1-6 on the iPad device. While extracting the object we will use the option of Add to existing to object ‘Del’.

images/download/attachments/3310038/image56.png

Step 8: Now Object repository contains both images.

images/download/attachments/3310038/image57.png

Step 9: Image recognition method will work on the Delete button regardless if it is this iPhone or iPad.